Add a EGL renderer (via ANGLE) for Windows
authorChun-wei Fan <fanchunwei@src.gnome.org>
Tue, 31 Jul 2018 10:11:26 +0000 (18:11 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Thu, 30 Jul 2020 06:26:33 +0000 (14:26 +0800)
commit257fd990d14488e8039a4f4511ee1efcfbf641f0
tree8cb01b712b32ce721f26215b55601836975acb46
parent12a23162b30f0329fbe0dbb2311ac28538349b2c
Add a EGL renderer (via ANGLE) for Windows

This is for adding a EGL-based renderer which is done via the ANGLE
project, which translate EGL calls to Direct3D 9/11.  This is done as a
possible solution to issue #105, especially for cases where the needed
full GL extensions to map OpenGL to Direct3D is unavailable or
unreliable, or when the OpenGL implementation from the graphics drivers
are problematic.

To enable this, do the following:
-Build ANGLE and ensure the ANGLE libEGL.dll and libGLESv2.dll are
 available.  A sufficiently-recent ANGLE is needed for things to
 work correctly--note that the copy of ANGLE that is included in
 qtbase-5.10.1 is sufficient.  ANGLE is licensed under a BSD 3-clause
 license.
-Build libepoxy on Windows with EGL support enabled.
-Currently, prior to running GTK+ programs, the GDK_DEBUG envvar needs
 to be set with gl-gles as at least one of the flags.

Known issues:
-Only OpenGL ES 3 is supported, ANGLE's ES 2 does not support the needed
 extensions, notably GL_OES_vertex_array_object, but its ES 3 support is
 sufficient.
-There is no autodetection or fallback mechanism to enable using
 EGL/Angle automatically yet.  There are no plans to do this in this
 commit.
gdk/gdkglcontext.c
gdk/win32/gdkdisplay-win32.c
gdk/win32/gdkdisplay-win32.h
gdk/win32/gdkevents-win32.c
gdk/win32/gdkglcontext-win32.c
gdk/win32/gdkglcontext-win32.h
gdk/win32/gdksurface-win32.c
gdk/win32/gdksurface-win32.h